1. Field of the Invention
The invention relates generally to the field of artificial intelligence, and more specifically to a system for manipulating rules and facts during an inference cycle.
2. Description of the Prior Art
Rule-based artificial intelligence systems, generally known as expert systems, typically include a set of rules, forming a "knowledge base", one or more facts, and an inference engine that manipulates the rules in response to the facts. Typical artificial intelligence systems include two general types of rules, namely, forward-chaining rules and backward-chaining rules, with the inference engine including a forward-chaining inference portion that operates in conjunction with the forward-chaining rules and a backward-chaining inference portion that operates in conjunction with the backward-chaining rules.
A forward-chaining rule is used to conclude new facts from a set of facts. More specifically, in response to a change of facts, the inference engine attempts to match conditions in each of the forward-chaining rules to the facts. If the conditions of a particular forward-chaining rule match the facts, the rule is said to "fire", and the inference engine then performs actions or operations specified in the rule. These operations may include, for example, addition, deletion and/or modification of facts, transmission of results to a user, and so forth. If, during processing of a forward-chaining rule, the inference engine adds, deletes or modifies a fact, the inference engine repeats these operations in response to the new or modified facts in the database, which may, in turn, cause other rules to fire. Forward-chaining rule processing proceeds iteratively until no further additions, modifications or deletions occur in connection with the facts.
A backward-chaining rule, on the other hand, is used to determine, given a conclusion, termed a goal or predicate, whether the predicate is supported by the facts, and may also identify the facts which support the predicate. A backward-chaining rule identifies the facts which are required to support the predicate. In addition, a backward-chaining rule may also identify other predicates, termed sub-goals, which, in turn, identify other backward-chaining rules which are also required to support the predicate. Since each sub-goal may, in turn, contain other sub-goals, backward-chaining rule processing proceeds, iteratively processing rules relating to all of the sub-goals, until all sub-goals are satisfied, at which point the main goal is determined to be supported by the facts.
In a typical expert system, the facts and rules are maintained by the inference engine in virtual memory as the expert system is running. In such systems, sharing of facts and rules among a plurality of operators is difficult. In addition, recovery from errors or a breakdown of the digital data processing system processing the expert system may be very difficult.